<?php
require_once('inc/init.php');
require_once('inc/pager.php');
require_once getCacheFilePath('forums.php');

$headtitle="会员列表";
	$curPage = numFilter($_GET["page"]);
	$pager = new Pager();
	$pager->init($cache_settings['userspernum'],$curPage,"userlist.php?page={page}");
	$rows = $pager->queryRows($db,"users","", "*","id desc");

	foreach($rows as $key=>$row){
		$row['username']=htmlFilter($row['username']);
		$row['signuptime']=getDateStr($row['signuptime']);
		$row['userpass']='';
		$row['logintime']=empty($row['logintime'])?"--":getDateStr($row['logintime']);
		$row['sex']=numFilter($row['sex'])==0?"男":"女";
		$mvalue='';
		foreach($cache_credits as $credits){
			$mvalue.="<td>{$row[$credits['creditscode']]}&nbsp;</td>";
		}
		$row['mvalue']=$mvalue;
		$row['userurl']=genUrl("user.php?uid={$row['id']}");
		$rows[$key]=$row;
	}

require_once('header.php');
require_once getTemplatePath('userlist.htm');
footer();
?>